<?php
	include("../connect.php");
	
	$ten_dn = $_REQUEST['ten_dn'];
	
	$sql = "SELECT * FROM thanh_vien WHERE ten_dn = '$ten_dn'";
	$rs = mysql_query($sql);
?>
  <tr>
    <td colspan="8"><h2><b>Danh sách thành viên</b></h2></td>
  </tr>
  <tr>
    <td align="center" class="title_left">STT</td>
    <td align="center" class="title_row">TÊN ĐĂNG NHẬP</td>
    <td align="center" class="title_row">EMAIL</td>
    <td align="center" class="title_row">SỐ ĐIỆN THOẠI</td>
	<td align="center" class="title_row">ĐỊA CHỈ</td>
	<td align="center" class="title_row">QUYỀN</td>
    <td align="center" class="title_row"><font color="#00FF00">Sửa</font></td>
    <td align="center" class="title_row"><font color="#FF0000">Xóa</font></td>
  </tr>
<?php
	$i=0;
	if($rw=mysql_fetch_array($rs)){
		$i++;					
?>
  <tr>
    <td class="stt"><?php  echo $i; ?></td>
    <td class="data_row"><?php echo $rw['TEN_DN'] ?>&nbsp;</td>
    <td class="data_row"><?php echo $rw['EMAIL'] ?>&nbsp;</td>
    <td class="data_row"><?php echo $rw['SO_DT'] ?>&nbsp;</td>
    <td class="data_row"><?php echo $rw['DIA_CHI'] ?>&nbsp;</td>
    <td class="data_row">
	<?php
		if($rw['MS_QUYEN'] == 1){
			echo 'Quản trị';
		}
		else echo 'Thành viên';
	?>
    </td>
    <td align="center" class="data_row"><img src="images/edit.gif" border="0" onClick="mo_form_sua('<?php echo $rw['TEN_DN'];?>')"/></td>
    <td align="center" class="data_row"><input type="checkbox" name="chkxoa" value="<?php echo $rw['TEN_DN']; ?>  " /></td>
  </tr>
<?php
	}
	else {
?>
	<tr>
    	<td colspan="8" align="center" style="background-color: white; border-left:1px solid gray; border-bottom:1px solid gray; border-right:1px solid gray; padding:5px;">Không tìm thấy</td>
    </tr>
<?php
	}
?>
 	<tr>
  		<td height="20" colspan="8"></td>
  	</tr>